package com.journaldev.spring.service;

import java.util.List;

import com.journaldev.spring.dao.PersonalOfficeDAO;
import com.journaldev.spring.dao.PrescriptionDAO;
import com.journaldev.spring.model.Prescription;

public class PrescriptionImpl implements PrescriptionService {
	
	public PrescriptionDAO prescriptionDAO;

	public PrescriptionDAO getPrescriptionDAO() {
		return prescriptionDAO;
	}

	public void setPrescriptionDAO(PrescriptionDAO prescriptionDAO) {
		this.prescriptionDAO = prescriptionDAO;
	}

	@Override
	public void addPrescription(Prescription p) {
		// TODO Auto-generated method stub
		this.prescriptionDAO.addPrescription(p);
	}

	@Override
	public void updatePrescription(Prescription p) {
		// TODO Auto-generated method stub
		this.prescriptionDAO.updatePrescription(p);
	}

	@Override
	public List<Prescription> listPrescription() {
		// TODO Auto-generated method stub
		return this.prescriptionDAO.listPrescription();
	}

	@Override
	public Prescription getPrescriptionById(int id) {
		// TODO Auto-generated method stub
		return this.prescriptionDAO.getPrescriptionById(id);
	}

	@Override
	public void removePrescription(Prescription id) {
		// TODO Auto-generated method stub
		this.prescriptionDAO.removePrescription(id);
	}

}
